1. Field of the Invention
The present invention relates to a device with an embedded storage space to backup data (i.e., an embedded device) and a method of controlling the same, and more particularly, to an embedded device having a reset function and a method of initializing the same.
2. Description of the Related Art
An embedded device, like a personal digital assistant (PDA), backs up data by using RAM (Random Access Memory). The PDA divides the storage space of the RAM into an operation area and a storage area. The operation area is for loading an OS (operating system), application programs and to temporarily record data input from a user. The storage area is for installing the application programs and backing up the data input from the user.
Moreover, the embedded device comprises a reset mode to re-operate the system in case the operation of the system is stopped. There are mainly two reset modes of a soft reset and a hard reset. The hard reset resets the system to an initial state by deleting all the data recorded in the RAM, while the soft reset starts the system by deleting only the data of the operation area in the RAM and preserving the data in the storage area. The hard reset and the soft reset are called ‘cold booting’ and ‘warm booting,’ respectively.
FIG. 1 is a flow chart of the soft reset and the hard reset of a conventional embedded device. At operation 110, an embedded device can enter an endless loop or application programs can conflict with other software or there might be an operating system kernel disorder, causing the system to be in a hang state. In the hang state, at operation 120, when the user selects either a hard reset or a soft reset, at operation 130, a reset operation in response to the selected reset command is performed. Accordingly, at operation 122, when a soft reset interrupt is generated as the soft reset command is input, at operation 132, a kernel interrupt handler of the OS performs the soft reset routine in response to the soft reset interrupt. That is, at operation 132, the warm booting is operated based on the soft reset routine. At operation 124, when the hard reset command is input by the user through an external input pin, at operation 134, the embedded device operates hardware initialization without using the kernel interrupt handler of the OS. In other words, at operation 134, the cold booting is operated based on the hard reset command input through the external input pin.
In the reset controlling method of the conventional embedded device, the user usually tries the soft reset first, and when there is no reply from the device, the user tries the hard reset. It is for the purpose of maintaining the data recorded in the RAM that the user first tries the soft reset. However, when there is no reply from the system, the user has no choice but to try the hard reset because typically it means that the kernel is in a panic, i.e., that there is disorder in the kernel. However, many users, especially those who are familiar with desktop computers, may be unaware that all the data recorded in the RAM are deleted when executing the hard reset in the embedded device.
Accordingly, when the user operates the hard reset on purpose, or by mistake, in the conventional embedded device, all the data recorded in the RAM is deleted. Especially, the user of the portable device, like the PDA, would be significantly inconvenienced because the hard reset initializes the system, deleting all configuration data set up by the user, application programs, and back-up data.